package com.ltg.demo.config;

import feign.Logger;
import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import reactor.util.retry.Retry;

/**
 * @Version 1.0
 * @Author LTG
 * @ClassName FeginConfig
 * @Date 2024/3/3 15:24
 */
@Configuration
public class FeignConfig {
    /**
     * 超时机制
     *
     * @return
     */
    @Bean
    public Retryer myRetryer() {
        return new Retryer.Default(100, 1, 3);
    }


    @Bean
    public Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;
    }
}
